/**
 ******************************************************************************
 * @file           : bsp_24cxx_config.h
 * @brief          : 24CXX EEPROM Configuration File (STM32F4xx)
 ******************************************************************************
 */

#ifndef __BSP_24CXX_CONFIG_H
#define __BSP_24CXX_CONFIG_H

#include "stm32f4xx.h"

#define EEPROM_USE_LOG     1

#if (EEPROM_USE_LOG == 1)
    #ifndef LOG_TAG
        #define LOG_TAG    "24CXX"
    #endif
    #include "elog.h"
#elif (EEPROM_USE_LOG == 2)
    #include <stdio.h>
    #define log_i(fmt, ...)     printf(fmt "\r\n", ##__VA_ARGS__)
    #define log_e(fmt, ...)     printf("[ERROR] " fmt "\r\n", ##__VA_ARGS__)
#else
    #define log_i(fmt, ...)
    #define log_e(fmt, ...)
#endif

#define EEPROM_I2C_ADDR     0xA0    /* 24C02 I2C地址 */
#define EEPROM_PAGE_SIZE    8       /* 页大小 */

#endif
